package com.yungu.swift.assets.passenger.service;

import com.yungu.swift.assets.passenger.model.dto.PassengerCouponDto;
import com.yungu.swift.assets.passenger.model.param.AdminPassengerCouponPageParam;
import com.yungu.swift.assets.passenger.model.param.AdminPassengerUuidPageParam;
import com.yungu.swift.assets.passenger.model.param.ApiPasPayCouponParam;
import com.yungu.swift.assets.passenger.model.vo.PassengerCouponExportVo;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.model.PageVo;
import com.yungu.swift.base.model.api.ApiBusinessPageParam;
import com.yungu.swift.base.service.BaseService;

import java.util.List;

/**
 * Copyright © 厦门云谷互联信息有限公司 2018-2020 All Right Reserved
 * <p>
 * 乘客优惠券逻辑处理接口
 *
 * @author cuixiuyin - Generate
 * @version 1.1.1-SNAPSHOT
 * @since 2018-07-03 18:03
 */
public interface PassengerCouponService extends BaseService<PassengerCouponDto> {

    /**
     * 获取可用的优惠券列表
     *
     * @param businessPageParam 参数
     * @return List
     */
    ResponseData<List<PassengerCouponDto>> getUseCouponList(ApiBusinessPageParam businessPageParam);

    /**
     * 获取支付时可用的优惠券列表
     *
     * @param couponParam 参数
     * @return List
     */
    ResponseData<List<PassengerCouponDto>> getPayCouponList(ApiPasPayCouponParam couponParam);

    /**
     * 获取最多优惠价格
     *
     * @param passengerUuid   参数
     * @param useBusinessType 参数
     * @param tripTotalFare   参数
     * @return PassengerCouponDto
     */
    ResponseData<PassengerCouponDto> findMinCoupon(String passengerUuid, Integer useBusinessType, Double tripTotalFare);

    /**
     * 可用的优惠券
     *
     * @param couponParam 参数
     * @return PassengerCouponDto
     */
    ResponseData<PassengerCouponDto> findMinCoupon(ApiPasPayCouponParam couponParam);


    /**
     * 后台-订单-乘客订单详情-获取优惠券总数
     *
     * @param passengerUuid 参数
     * @return int
     */
    ResponseData<Integer> getCount(String passengerUuid);


    /**
     * 批量新增乘客优惠券
     *
     * @param passengerCouponDtoList 参数
     * @return int
     */
    ResponseData<Integer> addBatch(List<PassengerCouponDto> passengerCouponDtoList);


    ResponseData<List<PassengerCouponExportVo>> listExport(AdminPassengerCouponPageParam passengerCouponPageParam);

    /**
     * 查询出关联订单的优惠券信息
     *
     * @param passengerCouponPageParam 参数
     * @return Map
     */
    ResponseData<PageVo<PassengerCouponDto>> queryOrderPage(AdminPassengerCouponPageParam passengerCouponPageParam);

    /**
     * 退回优惠卷
     *
     * @param orderUuid
     * @return
     */
    ResponseData<Boolean> refundCoupon(String orderUuid);

    /**
     * 获取跨城最多优惠价格
     *
     * @return
     */
    ResponseData<List<PassengerCouponDto>> findJoinMinCoupon(String passengerUuid, Integer useBusinessType, Double tripTotalFare, String originCity);

    /**
     * 后台优惠券列表
     *
     * @return
     */
    ResponseData<PageVo<PassengerCouponDto>> adminCouponList(AdminPassengerUuidPageParam param);
}